<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>最美医生</title>
    <?php require 'templates/common/head.html'; ?>
</head>
<body>
<!-- 配置文件 -->
<script type="text/javascript" src="../business/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="../business/ueditor/ueditor.all.min.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('container', {
        toolbars: [
            [ 'fullscreen', 'source', '|', 'undo', 'redo', '|',
                'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
                'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
                'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
                'directionalityltr', 'directionalityrtl', 'indent', '|',
                'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|','link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
                'simpleupload', 'insertimage','insertvideo', 'emotion', 'scrawl', 'attachment', 'map', 'gmap', 'insertframe']
        ],
        autoHeightEnabled: true,
        autoFloatEnabled: true
    });
</script>
<div class="container-fluid">
    <?php require 'templates/common/nav.html'; ?>
    <div class="panel panel-primary">
        <div class="panel-heading text-center">
            <h3 class="panel-title"><?php if($_GET['id']){ echo "修改";}else{ echo "添加";}?>医生咨询</h3>
        </div>
            <div style="padding: 30px 30px 10px;">
                <form action="" method="post" enctype="multipart/form-data" class="bs-example bs-example-form" role="form">
                    <input type="hidden" name="id" value="<?=$info->data['id']?>"/>
                    <input type="hidden" name="page" value="<?=$_GET['page']?>"/>
                    <div class="input-group">
                        <span class="input-group-addon">序号</span>
                        <input type="text" class="form-control" value="<?php if($id){ echo $info->data['number'];};?>" placeholder="输入序号" name="number">
                    </div>
                    <br>
                    <div class="input-group">
                        <span class="input-group-addon">姓名</span>
                        <input type="text" class="form-control" value="<?php if($id){ echo $info->data['name'];};?>" placeholder="输入姓名" name="name">
                    </div>
                    <br>
                    <div class="input-group">
                        <span class="input-group-addon">性别</span>
                        <?php $check = $info->data['sex']==男?'checked':"" ?>
                        <?php $check1 = $info->data['sex']==女?'checked':"" ?>
                        <input type="radio"  value="男" <?=$check?> name="sex">男
                        <input type="radio"  value="女" <?=$check1?> name="sex">女
                    </div>
                    <br>
                    <?php if($id):?>
                    头像：
                    <img  width="60px " height="60px" src="<?=G_SITE_BASE?>/<?= $info->data['head_img'] ?>">
                    封面：
                    <img  width="60px " height="60px" src="<?=G_SITE_BASE?>/<?= $info->data['img'] ?>">
                   宽:<input type="text" name="img_width" value="<?= $info->data['img_width'] ?>">高:<input type="text" name="img_height" value="<?= $info->data['img_height'] ?>">
                    <?php endif;?>
                    <div class="input-group">

                        <span class="input-group-addon">上传头像</span>

                        <input type="hidden" value="<?=@$info->data['head_img']?>"  name="old_head_pic">
                        <input type="file" class="form-control" name="pic[]">
                    </div>
                    <br>
                    <div class="input-group">

                        <span class="input-group-addon">上传封面</span>

                        <input type="hidden" value="<?=@$info->data['img']?>"  name="old_pic">
                        <input type="file" class="form-control" name="pic[]">
                    </div>
                    <br>
                    <div class="input-group">
                        <span class="input-group-addon">所在地区</span>
                        <input type="text" class="form-control" value="<?php if($id){ echo $info->data['address'];};?>" placeholder="输入所在地区" name="address">
                    </div>
                    <br>
                    <div class="input-group">
                        <span class="input-group-addon">所在医院</span>
                        <input type="text" class="form-control" value="<?php if($id){ echo $info->data['hospital'];};?>" placeholder="输入所在医院" name="hospital">
                    </div>
                    <br>
                    <div class="input-group">
                        <span class="input-group-addon">所在科室</span>
                        <input type="text" class="form-control" value="<?php if($id){ echo $info->data['keshi'];};?>" placeholder="输入所在科室" name="keshi">
                    </div>
                    <br>

                    <div class="input-group">
                        <span class="input-group-addon">职称</span>
                        <input type="text" class="form-control" value="<?php if($id){ echo $info->data['zhicheng'];};?>" placeholder="输入职称" name="zhicheng">
                    </div>
                    <br>
                  <div class="input-group">
                        <span class="input-group-addon">联系方式</span>
                        <input type="text" class="form-control" value="<?php if($id){ echo $info->data['dc_tel'];};?>" placeholder="输入医生的联系方式" name="dc_tel">
                    </div>
                    <br>
                    <div class="input-group">
                        <span class="input-group-addon">简介</span>
                        <input type="text" class="form-control" value="<?php if($id){ echo $info->data['descript'];};?>" placeholder="输入10-50个字符" name="descript">
                    </div>
                    <br>
                    <div class="input-group">
                        <span class="input-group-addon">模板ID</span>
                        <input type="text" class="form-control" value="<?php if($id){ echo $info->data['modle_id'];};?>" placeholder="输入10-50个字符" name="modle_id">
                    </div>
                    <br>
                    <div class="input-group input-story">
                        <span class="input-group-addon">医生故事</span>
                        <script id="container" name="descript_story" type="text/plain"><?=@$info->data['descript_story']?></script>


                    </div>
                   <!-- <br>
                    <div class="input-group">
                        <span class="input-group-addon">推荐人姓名</span>
                        <input type="text" class="form-control" value="<?php if($id){ echo $info->data['referee_name'];};?>" placeholder="输入推荐人姓名" name="referee_name">
                    </div>
                    <br>
                    <div class="input-group">
                        <span class="input-group-addon">推荐人联系方式</span>
                        <input type="text" class="form-control" value="<?php if($id){ echo $info->data['referee_tel'];};?>" placeholder="输入推荐人联系方式" name="referee_tel">
                    </div>
                    <br>-->

                    <div class="input-group">
                        <input type="submit" class="form-control btn btn-primary" value="提交">
                    </div>
                </form>
            </div>
    </div>
</div>
<?php require 'templates/common/foot.html'; ?>
</body>
</html>